﻿/********************************************************************
	日期:2022/03/31
	名称:LoopDragonAni
	邮箱:yunnibbd@163.com
	作者:yunni
	描述:飞龙循环动画
*********************************************************************/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LoopDragonAni : MonoBehaviour{
    public Animation ani;

    private void Awake(){
        ani = GetComponent<Animation>();
    }

    private void Start(){
        if (ani != null){
            InvokeRepeating("PlayDragonAnim", 0, 20);
        }
    }

    private void PlayDragonAnim(){
        if (ani != null){
            ani.Play();
        }
    }
}